feat(metadata-admin): book metadata display UI (ADR-0046 §6)#1775
Merged
Conversation
The framework added a `book` metadata type (documentation navigation
spine — ordered groups with membership derived over docs via glob/tag
rules) in ADR-0046 §6, but objectui had no display surface for it.
Add the standard per-type display layer the metadata-admin engine
expects, mirroring the existing types:
- BookPreview: visualises the authored spine — identity/access header
(label, slug, audience chip), groups sorted by order, each group's
include rule (glob or {tag}) and package scope, and any explicit
`pages` override (doc entries, `---` separators, `...` rest, badges,
external links). Defensive reads; degrades to a hint, never throws.
Toolbar links to GET /meta/book/:name/tree for the live-resolved tree.
- default-schemas: fallback JSONSchema for the Form tab.
- i18n: type label (EN "Documentation Book" / ZH "文档手册").
- builtinComponents: registerMetadataResource (domain system, columns).
- BookPreview.test: 8 cases (empty/glob/tag/override/orphan/order/bad draft).
Note: the metadata-admin type list is server-driven from /meta/types, so
`book` only surfaces once the running backend serves a framework build
that includes it (not in the published @objectstack/spec@9.5.1 yet).
This is the ready-and-waiting client display layer.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…splay-ui # Conflicts: # packages/plugin-markdown/src/MarkdownImpl.tsx
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The framework added a
bookmetadata type (ADR-0046 §6) — a documentation navigation spine: ordered groups whose membership over docs is derived from each group'sincluderule (glob /{ tag }), with an explicitpagesoverride for curated order. objectui had no display surface for it. This adds the standard per-type display layer the metadata-admin engine expects, mirroring every existing type.Changes
BookPreview.tsx— visualises the authored spine: identity/access header (label, slug,audiencechip → org/public/profile), groups sorted byorder, each group'sincluderule +packagescope, and any explicitpagesoverride (doc entries,---separators,...rest, badges, external links). Reads the draft defensively and degrades to a hint rather than throwing. Toolbar links toGET /meta/book/:name/treefor the live-resolved tree.default-schemas.ts— fallback JSONSchema for the Form tab (name/label/description/slug/icon/order/audience/groups).i18n.ts— type label (EN Documentation Book / ZH 文档手册).builtinComponents.tsx—registerMetadataResource(domainsystem, list columns incl. audience + group count).BookPreview.test.tsx— 8 cases (empty / glob / tag / explicit-override / orphan group / ordering / malformed draft).The metadata-admin type list is server-driven from
/meta/types(filtered to the active project package). This client registration only enhances a server-provided entry — it does not makebookappear on its own.bookwas added to the spec in the framework repo (ADR-0046, commit71578f2b3) but is not in the published@objectstack/spec@9.5.1objectui currently depends on. So this is the ready-and-waiting client display layer;bookrenders end-to-end once the backend serves a framework build that includes it.Verification
tsc --noEmit✅ (exit 0)vitest run BookPreview.test.tsx✅ 8/8eslint✅ 0 errors (5anywarnings, consistent with the neighboringAppPreviewconvention)Not browser-verified:
bookisn't server-served in the current env (backend on spec 9.5.1), so a dev server wouldn't exercise it — unit tests are the meaningful proof here.🤖 Generated with Claude Code
Relationship to #1774 (ADR-0051)
Separate, complementary surface. #1774 implements ADR-0051 —
element:metadata_viewer+ the```metadatadoc fence (rendering metadata views inline inside docs). This PR is the ADR-0046bookmanagement/display UI in the metadata-admin Studio (authoring the navigation spine). Different ADR, different surface; no overlap in touched files.